/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package colloque.servlets;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

public class Deconnexion extends HttpServlet {


    @Override
    public void doGet( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException {
        /* Déstruction de la session */
        
        HttpSession session = request.getSession();
        session.invalidate();
        
        // this.getServletContext().getRequestDispatcher("/jsp/connexion.jsp").forward(request, response);
        response.sendRedirect("Connexion");
    }

}